from common.player import Player
import common.defines as defines
import wx

class cPlayer(Player):
    
    def __init__(self, id=None, name='NoName'):
        super(cPlayer, self).__init__(id=id, name=name)
        
    def render_hand(self, dc, sprite):
        x1_base = 30
        y1_base = 270
        if self.current_hand != None:
            for i, card in enumerate(self.current_hand):
                x = card.face * defines.X_INDEX_MULT + 1
                y = card.suit * defines.Y_INDEX_MULT + 1
    #            x1 = i*defines.CARD_WIDTH + i*5 + base
                x1 =  (i * 30) + x1_base
                y1 = -(i * 35) + y1_base
                dc.DrawBitmap(sprite.GetSubBitmap(wx.Rect(x, y, defines.CARD_WIDTH, defines.CARD_HEIGHT)), x1, y1)